import numpy as np
from scipy.spatial import ConvexHull


def polygon_H_from_vertices(vertices):
    vertices = np.array(vertices)
    hull = ConvexHull(vertices)

    A = hull.equations[:, :-1]
    b = -hull.equations[:, -1]
    b = b.reshape(-1, 1)
    return A, b
